home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-06-26 | 1.4 KB | 48 lines | [TEXT/GEOL] |
- Item 5614659 6-May-89 05:57
-
- From: X0591 MacApp Dev Assoc, Howard Katz
-
- To: CDA0373 AUC Lakehead University
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Response to Changing Field
-
- Alan,
-
- I’ve never heard of a mechanism like that. The closest you can come is
- adding your more specialized field name YOURSELF and doing an assignment to it
- in your new Init method, as in:
-
- TMyObject = Object( whatever )
-
- fMyField : FieldType;
-
- TMyObject.IMyObject ( fieldVal: FieldType );
-
- ...
-
- TMySpecializedObject = Object( TMyObject )
-
- fMySpecializedField: FieldType;
-
- PROCEDURE TMySpecializedObject.IMySpecializedObject(
- fieldVal: FieldType )
- BEGIN
- fMySpecializedField := fieldVal;
- fMyField := fieldVal;
- { or even better => } IMyObject( fieldVal );
- END;
-
- But then you have TWO of everything, and a great potential for disaster!
- Plus of course any code you’re inheriting is going to use fMyField and
- not fMySpecializedField. Doesn’t sound like a good idea! It confuses more
- than it clarifies.
-
- (By the way, a “netiquette” suggestion: sign your links so that people can
- know who they’re talking to - it’s hard to say “Dear AUC Lakehead
- University...”!)
-
- Howard
-
-